#ifndef LOGINTHREAD_H
#define LOGINTHREAD_H
#include <QThread>
#include <QFile>
#include <QTextStream>
#include <QCloseEvent>
#include "gheaders.h"
#include <QErrorMessage>
#include <QFileDialog>
#include <QDir>
#include "tcp_routines.h"
#include <QString>
#include <QStringList>

class LoginThread:public QThread
{
    Q_OBJECT
public:
    QStringList userList;
    int ctl_sock;
    QString userName;
    QString passwd;
    bool r;//用来记录用户是否选择了自动登录
    bool s;//用来记录用户是否选择了记住密码
    LoginThread(QString userName,QString passwd,QString tmp,bool R,bool S);
    void run();
private:
    QString workDir;           //程序当前的工作目录
signals:
    void loginFailed(int);
    void hasloged(int fd,QString userName);
};

#endif // LOGINTHREAD_H
